const express = require('express');
const multer = require('multer');
const path = require("path");
const Result = require('../models/Result');
const { UPLOAD_PATH ,UPLOAD_URL } = require('../utils/constant')
const { decoded } = require("../utils");
const  homeServices  = require('../services/home');
const Boom = require('boom');

const router = express.Router();


router.post(//查询轮播图列表
    '/bannerList',
    function(req,res){
       
        homeServices.BannerList().then(data=>{
            new Result(data,'请求成功').success(res)
        })
        
})

router.post(//查询活动列表
    '/centreList',
    function(req,res){
       
        homeServices.centreList().then(data=>{
            new Result(data,'请求成功').success(res)
        })
})

router.get(//获取系统配置
    '/getConfiguration',
    function(req,res){
        homeServices.getConfiguration().then(data=>{
            new Result(data,'获取成功').success(res)
        })
})



module.exports = router